const AUTH_KEY = 'token'
const HISTORY = 'historys'
export const setAuthToken = (token) => {
  localStorage.setItem(AUTH_KEY, token)
}

export const getAuthToken = () => {
  return localStorage.getItem(AUTH_KEY)
}

export const removeAuthToken = () => {
  localStorage.removeItem(AUTH_KEY)
}

export const GET_HISTORY = () => {
  return JSON.parse(localStorage.getItem(HISTORY))
}

export const SET_HISTORY = (data) => {
  localStorage.setItem(HISTORY, JSON.stringify(data))
}

export const REMOVE_HISTORY = () => {
  localStorage.removeItem(HISTORY)
}
